{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 描述\n",
    "Python isdecimal() 方法检查字符串是否只包含十进制字符。这种方法只存在于unicode对象。\n",
    "\n",
    "注意:定义一个十进制字符串，只需要在字符串前添加 'u' 前缀即可。\n",
    "\n",
    "# 语法\n",
    "isdecimal()方法语法：\n",
    "```\n",
    "str.isdecimal()\n",
    "```\n",
    "# 参数\n",
    "无\n",
    "\n",
    "# 返回值\n",
    "如果字符串是否只包含十进制字符返回True，否则返回False。\n",
    "\n",
    "# 实例\n",
    "以下实例展示了 isdecimal()函数的使用方法："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "str = \"this2009\"\n",
    "print(str.isdecimal())\n",
    "\n",
    "str = u\"23443434\"\n",
    "print(str.isdecimal())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
